home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / heapst10.zip / TEST.PAS < prev   
Pascal/Delphi Source File  |  1993-01-04  |  415b  |  30 lines

  1. PROGRAM test;
  2.  
  3. {Test/demo for unit heapstr}
  4.  
  5.  
  6. USES
  7.   heapstr;
  8.  
  9.  
  10. VAR
  11.   st: heap_string;
  12.  
  13.  
  14. PROCEDURE report;
  15. BEGIN
  16.   Writeln ('Maxavail = ', MaxAvail:6, '  st = "', st.value, '"');
  17. END;
  18.  
  19.  
  20. BEGIN {test}
  21.   st.init;
  22.   report;
  23.   IF NOT st.store ('This is a string') THEN RunError;
  24.   report;
  25.   IF NOT st.store ('This is a different string') THEN RunError;
  26.   report;
  27.   st.dispose;
  28.   report
  29. END.
  30.